<?php
class UpdateController extends SController{
    public function index(){
        $mid=$_GET['mid'];
        $a=Factory::getClass('UpdateModel');
        $match=$a->show($mid);
        //var_dump($match);
        $team=$a->Steam();
        //var_dump($team);die;
        $this->_smart->assign('match',$match);
        $this->_smart->assign('team',$team);
        $this->display();        
    }

    public function doupdate(){
        $a=Factory::getClass('UpdateModel');
        $str='';
        
        foreach($_POST as $k=>$v){         
            $str.="$k='$v',";       
        }
        var_dump($str);
        $mid=$_GET['mid'];

        $a->Update($str,$mid);

        echo '<script>window.location.href="index.php"</script>';
    }
}











?>